// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	2/21/2015 12:56:03 AM				
// -----------------------------

#ifndef _TextureManager_h
#define _TextureManager_h

#include "Common.h"
#include "CommandHandler.h"

namespace Flow
{

	class IGraphicsDevice;
	class ITexture;
	class IMutex;

	class TextureManager
	{
	public:
		TextureManager(IGraphicsDevice* lpDevice, IMutex* lpGraphicsMutex);
		virtual ~TextureManager();

		ITexture*	LoadTexture(const tstring& file);
		ITexture*	GetTexture(const tstring& file, Bool loadIfNotFound = true);

	private:

		IGraphicsDevice*		m_lpGraphicsDevice;
		IMutex*					m_lpGraphicsMutex;
		map<tstring, ITexture*>	m_Textures;

		TextureManager(const TextureManager& refTextureManager);
		TextureManager& operator=(const TextureManager& refTextureManager);
	};

}

#endif